package com.gitee.huanminabc.utils_test.provider;

import com.gitee.huanminabc.dynamicdb.core.DBContext;
import com.gitee.huanminabc.utils_test.dto.UserRpcDto;
import com.gitee.huanminabc.utils_test.service.test.TestUserService;
import org.apache.dubbo.config.annotation.DubboService;

@DubboService //这里是dubbo的注解, 将接口暴露在外, 可以供调用, 这里就是放在了注册中心
public class TestUserServiceImpl implements TestUserService {
    @Override
    public String getUserById() {
        String s = DBContext.tenantKeys.get();
        System.out.println("tenantKeys:" + s);
        return "hello-springboot" ;
    }

    @Override
    public String getUserById(UserRpcDto userRpcDto) {
        System.out.println(userRpcDto.is());
        return "hello-springboot" + userRpcDto.toString();
    }
}